Integrand size = 29, antiderivative size = 60 \[ \int \frac {\cos (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=-\frac {(A-B) x}{a}+\frac {(2 A-B) \sin (c+d x)}{a d}-\frac {(A-B) \sin (c+d x)}{d (a+a \sec (c+d x))} \]
[Out]
Time = 0.14 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {4105, 3872, 2717, 8} \[ \int \frac {\cos (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {(2 A-B) \sin (c+d x)}{a d}-\frac {(A-B) \sin (c+d x)}{d (a \sec (c+d x)+a)}-\frac {x (A-B)}{a} \]
[In]
[Out]
Rule 8
Rule 2717
Rule 3872
Rule 4105
Rubi steps \begin{align*} \text {integral}& = -\frac {(A-B) \sin (c+d x)}{d (a+a \sec (c+d x))}+\frac {\int \cos (c+d x) (a (2 A-B)-a (A-B) \sec (c+d x)) \, dx}{a^2} \\ & = -\frac {(A-B) \sin (c+d x)}{d (a+a \sec (c+d x))}-\frac {(A-B) \int 1 \, dx}{a}+\frac {(2 A-B) \int \cos (c+d x) \, dx}{a} \\ & = -\frac {(A-B) x}{a}+\frac {(2 A-B) \sin (c+d x)}{a d}-\frac {(A-B) \sin (c+d x)}{d (a+a \sec (c+d x))} \\ \end{align*}
Time = 0.73 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.27 \[ \int \frac {\cos (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {\sin (c+d x) \left (A+\frac {(A-B) \left (\arcsin (\cos (c+d x)) (1+\cos (c+d x))+\sqrt {\sin ^2(c+d x)}\right )}{\sqrt {1-\cos (c+d x)} (1+\cos (c+d x))^{3/2}}\right )}{a d} \]
[In]
[Out]
Time = 0.90 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.72
method | result | size |
parallelrisch | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (A \cos \left (d x +c \right )+2 A -B \right )-d x \left (A -B \right )}{d a}\) | \(43\) |
derivativedivides | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +\frac {2 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-2 \left (A -B \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(76\) |
default | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +\frac {2 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-2 \left (A -B \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(76\) |
norman | \(\frac {\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{a d}+\frac {\left (3 A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {\left (A -B \right ) x}{a}-\frac {\left (A -B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{a}}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\) | \(97\) |
risch | \(-\frac {A x}{a}+\frac {x B}{a}-\frac {i A \,{\mathrm e}^{i \left (d x +c \right )}}{2 a d}+\frac {i A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 a d}+\frac {2 i A}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}-\frac {2 i B}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}\) | \(99\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.05 \[ \int \frac {\cos (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=-\frac {{\left (A - B\right )} d x \cos \left (d x + c\right ) + {\left (A - B\right )} d x - {\left (A \cos \left (d x + c\right ) + 2 \, A - B\right )} \sin \left (d x + c\right )}{a d \cos \left (d x + c\right ) + a d} \]
[In]
[Out]
\[ \int \frac {\cos (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {\int \frac {A \cos {\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 143 vs. \(2 (60) = 120\).
Time = 0.30 (sec) , antiderivative size = 143, normalized size of antiderivative = 2.38 \[ \int \frac {\cos (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=-\frac {A {\left (\frac {2 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {2 \, \sin \left (d x + c\right )}{{\left (a + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} - B {\left (\frac {2 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{d} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.32 \[ \int \frac {\cos (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=-\frac {\frac {{\left (d x + c\right )} {\left (A - B\right )}}{a} - \frac {A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a} - \frac {2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a}}{d} \]
[In]
[Out]
Time = 13.66 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.08 \[ \int \frac {\cos (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {2\,A\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a\right )}-\frac {x\,\left (A-B\right )}{a}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A-B\right )}{a\,d} \]
[In]
[Out]